<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%request.setCharacterEncoding("UTF-8"); %>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>判断验证是否通过</title>
</head>
<body>
<% 
	String name = request.getParameter("loginID");
	String pwd = request.getParameter("loginPwd");
	String code = request.getParameter("code");
	String validate = session.getAttribute("ccode").toString();
	if (validate.equals(code)) 
	{
		if (name.equals("朱媛") && pwd.equals("123456")) 
		{
			session.setAttribute("loginID", name);
			session.setAttribute("loginPwd", pwd); 
			response.sendRedirect("LoginUser.jsp");
		} 
		else 
		{
			response.sendRedirect("Login.jsp?erroy=1");	
		}

	} 
	else {
		
		response.sendRedirect("Login.jsp?erroy=0");
	}

%>
</body>
</html>